import { createStore } from "vuex";
import createPersistedState from "vuex-persistedstate";
import user from "./modules/user";
import tabs from "./modules/tabs";
import menu from "./modules/menu";
import terminal from "./modules/terminal";
import terminal2 from "./modules/terminal2";
import goodsType from "./modules/goodsType";
import depositPlace from "./modules/depositPlace";
import repair from "./modules/repair";
import cmProjectType from "./modules/cmProjectType";
import breadcrumb from './modules/breadcrumb'
// import construction from "./modules/construction";

export default createStore({
  modules: {
    user,
    tabs,
    menu,
    goodsType,
    terminal,
    terminal2,
    depositPlace,
    repair,
    cmProjectType,
    breadcrumb
    // construction
  },
  plugins: [
    createPersistedState({
      storage: window.localStorage,
      key: "CacheState",
      paths: ["user", "menu"],
    }),
  ],
});
